import request from '@/utils/request';

export async function getSpareFileByPage (params: any) {
    return request('/api/device/getSpareFileByPage', {
    method: 'POST',
    data: params,
  });
}



export async function addSpareFile (params: any) {
    return request('/api/device/addSpareFile', {
    method: 'POST',
    data: params,
  });
}

export async function updateSpareFile (params: any) {
    return request('/api/device/updateSpareFile', {
    method: 'POST',
    data: params,
  });
}

export async function delSpareFile (params: any) {
    return request('/api/device/delSpareFile', {
    method: 'POST',
    data: params,
  });
}


export async function exportSpareFile(params: any) {
    return request('/api/device/exportSpareFile', {
    method: 'POST',
    data: params,
    responseType: 'blob',
  });
}
export default { getSpareFileByPage, addSpareFile, updateSpareFile, delSpareFile, exportSpareFile }
